{% extends '/layout.html' %}

{% block title %}参赛作品评选系统 - 欢迎注册{% endblock %}

{% block body %}
<h1>欢迎注册</h1>

{% for message in get_flashed_messages() %}
        <span>{{ message }}</span><br/>
{% endfor %}

<form action="{{ url_for('users.register') }}" method="POST">

    {{ form.hidden_tag() }}

    <div>
        <span>{{ form.name.label }}</span>
        &nbsp;{{ form.name }}
        {{ macros.show_errors(form.name.errors) }}
    </div>

    <div>
        <span>{{ form.password.label }}</span>
        &nbsp;{{ form.password }}
        {{ macros.show_errors(form.password.errors) }}
    </div>

    <div>
        <span>{{ form.mobile.label }}</span>
        &nbsp;{{ form.mobile }}
        {{ macros.show_errors(form.mobile.errors) }}
    </div>

    <div>
        <span>{{ form.user_type.label }}</span>
        &nbsp;{{ form.user_type }}
        {{ macros.show_errors(form.user_type.errors) }}
    </div>

    <div>{{ form.submit }}</div>
</form>
<a href="{{ url_for('users.login')}}">去登录</a>
{% endblock %}